# 杨辉三角

class Solution(object):
    def generate(self, numRows):
        """
        :type numRows: int
        :rtype: List[List[int]]
        """
        result = list()
        # layer = list()
        # layer.append(1)
        # result.append(layer)
        for i in range(numRows): # 4
            # if i == 0:
            #     continue
            layer = list()
            for j in range(i+1): # i+1=1,2,3,4
                if j == 0 or j == i:
                    layer.append(1)
                else:
                    layer.append(result[i-1][j-1] + result[i-1][j])
            result.append(layer)
        return result


x = 3
for i in range(0):
    print(i)

l = [10, 20, 30, 40]
print(l[1])
print(l[2])
